package com.frame.imageprocess.factory;


import com.frame.imageprocess.strategy.BusinessLicenseStrategy;
import com.frame.imageprocess.strategy.DriverLicenseStrategy;
import com.frame.imageprocess.strategy.IdCardStrategy;
import com.frame.imageprocess.strategy.ParsePicStrategy;

public class PicParseStrategyFactory {
    public static ParsePicStrategy createStrategy(String imageType, String params){
        switch (imageType){
            case "driverLicense":
                return new DriverLicenseStrategy(params);
            case "businessLicense":
                return new BusinessLicenseStrategy(params);
            case "idCard":
                return new IdCardStrategy(params);
            default:
                throw new IllegalArgumentException("Invalid image type.");
        }
    }
}
